package com.zan.spring.service.impl;

import com.zan.spring.dao.UserDao;
import com.zan.spring.service.UserService;

/**
 * @Author Zan
 * @Create 2024/4/28 9:29
 * @Description : 业务逻辑层实现类
 * @ClassName: UserServiceImpl
 */
public class UserServiceImpl implements UserService {

    // 声明一个UserDao类型的变量
    private UserDao userDao;

    public UserServiceImpl() {
        System.out.println("userService被创建");
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void add() {
        System.out.println("UserService ...");
        userDao.add();
    }
}
